//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include <cstdlib>

#include <iostream>
#include <fstream>

#include "ExtractComplexSeparated.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
using namespace std;
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
int main(int argc, char** argv) {

  String* location;
  String* filenameListIn;
  String* locationProtein;
  String* listToTopMatchMatrix;

  if (argc < 5) {
    cout << "Error in the input arguments. The execution must be: " << endl;
    cout << "./ExtractCoordProtein <Path of the folder with pdb files> <File with list of files> <Path of folder to protein pdb file> <File with list of PDBID, Chain>" << endl;
    return 0;
  }
  else {
    cout << "---------------------------------------------------------------------------------" << endl;
    cout << "             PDB Path : " << argv[1] << endl;
    cout << "   List of Input File : " << argv[2] << endl;
    cout << "Output Protein Folder : " << argv[3] << endl;
    cout << " List of Select Chain : " << argv[4] << endl;
    cout << "---------------------------------------------------------------------------------" << endl;
    location             = new String(argv[1]);
    filenameListIn       = new String(argv[2]);
    locationProtein      = new String(argv[3]);
    listToTopMatchMatrix = new String(argv[4]);
  }

  ExtractComplexSeparated* extractComplexSeparated = new ExtractComplexSeparated();

  extractComplexSeparated->Location(location);
  extractComplexSeparated->ListInFilename(filenameListIn);
  extractComplexSeparated->LocationProteinOut(locationProtein);
  extractComplexSeparated->OutList(listToTopMatchMatrix);

  extractComplexSeparated->GeneratedDBCoordProtein();

  cout << "---------------------------------------------------------------------------------" << endl;

  if (extractComplexSeparated) delete extractComplexSeparated;

  return 1;
  
}

//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
